/*---------------------------------------选着多个---------------------------------------------*/

$(function(){
	
});
function onKST_input(question_one,question_two,item_name){
	
//年龄、电话
	if($('#phone').val()&&$('#name').val()){
		var ycqk ="姓名："+$('#name').val()+";";
		var ycqk =ycqk+ "电话："+$('#phone').val()+";";
		
	}else{
		alert("请填写姓名、电话！！！");
		return false;
	}
	
	console.log(ycqk);
	


	//判断项目
	var tmchec_1=question_one+":";
	tmparr = [];//定义空数组，判断是否为空，空则没有选择
	obj = document.getElementsByName("ycqh");
	for(k in obj){
		if(obj[k].checked){
			tmchec_1 = tmchec_1 + obj[k].value + ",";
			tmparr.push(obj[k].value);
		}
	}
	var ycqk = ycqk+tmchec_1;


	
	//判断数组是否为0，如果为零，表示没选择项目
	if(tmparr.length==0){
		alert(question_one);
		return false;
	}
	
	
	//判断年龄
	var tmchec_2="";
	obj = document.getElementsByName("age");
	tmparr_age = [];
	for(k in obj){
		if(obj[k].checked){
			tmchec_2 = tmchec_2 + obj[k].value + ",";
			tmparr_age.push(obj[k].value);
		}
	}
	tmchec_2 = "年龄："+tmchec_2;
	var ycqk = ycqk+";"+tmchec_2+"; ";
	
	if(tmparr_age.length==0){
		alert("请填写年龄！！");
		return false;
	}
	
	//是否做过
	var tmchec_3="";
	
	obj = document.getElementsByName("ytlx");
	tmparr_done = [];
	for(k in obj){
		if(obj[k].checked){
			tmchec_3 = tmchec_3 + obj[k].value + ",";
			tmparr_done.push(obj[k].value);
		}
	}
	var ycqk =ycqk+ "是否做过类似的项目："+tmchec_3+";";
	
	if(tmparr_done.length==0){
		alert("请选择是否做过！！");
		return false;
	}
	console.log(ycqk);
	var ksChatLink='https://dqt.zoosnet.net/LR/Chatpre.aspx?id=DQT80840762&lng=cn&e='+ycqk;
	window.location.href=ksChatLink;
}